package javaClassExercise.javaInterface;

/**
 * Created by lomo on 2017/10/29.
 */
public class peopleActionTest extends peopleAction {

    //在对子类进行初始化的时候，会先调用父类的构造器
    peopleActionTest() {
        super();
        System.out.println("子类");
    }

    @Override
    protected String abstractTestMethod(String s) {
        return s;
    }


    @Override
    public void walk(Double s) {
        System.out.println("Lomo has been walked " + s + "km");
    }

    //重载walk方法
    public void walk(String Name, Double s) {
        System.out.println(Name + "had been walked " + s + "km ...");
    }

    public static void main(String[] args) {
        peopleAction p = new peopleActionTest();
//        peopleAction pp = new peopleAction();

        p.eat("米饭");
        p.walk(2.5);

        peopleActionTest ps = new peopleActionTest();
        ps.walk(4.2);
        ps.walk("chenqiao", 7.8);

    }


}
